<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
		<%
		String n1 = request.getParameter("s1");
		String n2 = request.getParameter("s2");
		String n3 = request.getParameter("s3");
		
		double result = 0.0;
		if(n3.equals("+")){
			result = Double.parseDouble(n1)+Double.parseDouble(n2);
		}else if(n3.equals("-")){
			result = Double.parseDouble(n1)-Double.parseDouble(n2);
		}else if(n3.equals("*")){
			result = Double.parseDouble(n1)*Double.parseDouble(n2);
		}else{
			result = Double.parseDouble(n1)/Double.parseDouble(n2);
		}
		%>
		<%=n1+n3+n2 %>结果为<%=result %>
</body>
</html>